<template>
  <div class="page">
    <Navbarelder title="最新政策" />
    <div class="content">
      <van-pull-refresh v-model="refreshLoading" @refresh="onRefresh">
        <van-empty v-if="!tableData.length" description="暂无数据" />
        <div v-if="tableData.length" class="list">
          <div v-for="(item,index) in tableData" :key="index" class="list-item" @click="routerJump(item)">
            <img :src="item.icon" alt="">
            <!--            <div class="body">-->
            <!--              <div class="f-r a-c j-b">-->
            <!--                <div class="title">{{ item.title }}</div>-->
            <!--                <div class="btn f-s">查看更多 ></div>-->
            <!--              </div>-->
            <!--              <div class="desc">{{ item.desc }}</div>-->
            <!--            </div>-->
          </div>
        </div>
      </van-pull-refresh>
    </div>

  </div>
</template>

<script>
import refresh from '@/mixins/refresh'
import { http_policy } from '@/api'
export default {
  name: 'Policy',
  mixins: [refresh],
  data() {
    return {
      tableData: [
        {
          type: 1,
          icon: require('@/assets/home/Policy_1.png'),
          title: '宁波市工业稳增长扩...',
          desc: '为贯彻落实中央和省委、市委经济工作会议以及“早准备、抢开局、稳增长”的目标要求...'
        },
        {
          type: 2,
          icon: require('@/assets/home/Policy_2.png'),
          title: '宁波市工业稳增长扩...',
          desc: '为贯彻落实中央和省委、市委经济工作会议以及“早准备、抢开局、稳增长”的目标要求...'
        },
        {
          type: 3,
          icon: require('@/assets/home/Policy_3.png'),
          title: '宁波市工业稳增长扩...',
          desc: '为贯彻落实中央和省委、市委经济工作会议以及“早准备、抢开局、稳增长”的目标要求...'
        }
      ]
    }
  },
  methods: {
    routerJump(item) {
      this.$router.push({
        path: '/policy-elder',
        query: {
          type: item.type,
          vconsole: true
        }
      })
    }
  }
}
</script>

<style scoped lang="scss">
 .page {
     .list {
         width: 100%;
         .list-item {
             margin-bottom: 20px;
             width: 100%;
             border-radius: 10px;
             background-color: #ffffff;
             overflow: hidden;
             img {
                 width: 100%;
                 height: 100%;
                 border-radius: 10px;
                 overflow: hidden;
             }
             .body {
                 padding: 0 20px 20px 20px;
             }
             .title {
                 font-size: 18px;
                 font-family: Source Han Sans CN;
                 font-weight: bold;
                 color: #3E51B7;
                 line-height: 40px;
             }
             .btn {
                 margin-left: 20px;
                 font-size: 10px;
                 font-family: Source Han Sans CN;
                 font-weight: 400;
                 color: #2F86FD;
                 line-height: 40px;
             }
             .desc {
                 font-size: 12px;
                 font-family: Source Han Sans CN;
                 font-weight: 400;
                 color: #8A8B90;
                 line-height: 20px;
             }
         }
     }
 }
</style>
